import string
import random
def generate(wei, str_list, latest=0):
    str_len = len(str_list)
    latest = random.randint(0, str_len ** wei)
    pwd = ''
    get = latest
    for num in range(wei):
        j = divmod(get, str_len)
        pwd += str_list[j[1]]
        get = j[0]
    return pwd[::-1]

def warpper(key_word, wei=8):
	digit_list = string.digits
	letters_lt = string.letters
	random.seed(hash(key_word))
	return generate(wei, digit_list+letters_lt)

if __name__ == '__main__':
	print(warpper("somebody"))